#!/usr/bin/env bash
# It's hard to remember the numeric prefix for say generic.wart.
# Run this script to create filenames more mnemonic and more amenable to
# autocompletion.

# Design considered the following:
#   use the most popular shell that works

for file in [0-9]*.{cc,wart,test}
do
  newfile=`echo $file |sed 's/^[0-9]*//g'`
  if [[ $newfile != "."* ]]
  then
    ln -s "$file" "$newfile"
  fi
done

# To safely delete these symlinks, use:
#   $ find . -maxdepth 1 -type l -exec rm {} \;
# To unclutter your git status, use:
#   $ find . -maxdepth 1 -type l -printf "%P\n" > .gitignore
# Make sure you haven't manually created any symlinks or a .gitignore file.
